<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/9 0009
 * Time: 上午 11:49
 */
namespace app\t\controller;
use think\Controller;
use think\Db;

class Index extends Controller
{
    public function mem()
    {
        $info = [
            'username' => '633633',
            'password' => '123456',
            'password_confirm' => '123456',
            'phone' => '18814101313',
//            'oldpwd' => '123123',
//            'newpwd' => '123456',
//            'id' => 1,
//            'keyword' => 1
        ];
//        $result = getapi($info, '/member/api/user_list');
//        $result = getapi($info,'/member/api/update');
//        $result = getapi($info,'/member/api/login');
        $result = getapi($info,'/member/api/register');
        dump(decodeData($result));
        print_r($result);
    }
    public function index(){
        $a = [
            /*'title'=>'www ',
            'pid'=>1,
            'content'=>2,
            'img'=>'ddd'*/
//            'id'=>8,
//            'keyword'=>1
//            'from_userid'=>1
        ];
        $res = getapi($a,'/article/compose.api/cp_list');
//        $res = getapi($a,'/article/compose.api/cp_info');
        dump(decodeData($res));
        print_r($res);

    }

    public function a(){
        $a=[
            'role_id'   =>100,
            'role_name' =>'号',
            'role_auth_ids'=>'1,11,12,13'
        ];
        $res = getapi($a,'/auth/api/role_list');
        dump(decodeData($res));
        print_r($res);
    }
}